//
//  UITextView+Custom.m
//  DreamOf
//
//  Created by 薛小刚 on 2018/3/28.
//  Copyright © 2018年 薛小刚. All rights reserved.
//

#import "UITextView+Custom.h"

@implementation UITextView (Custom)

- (void) setPlaceholder:(NSString *) string font:(UIFont *) font {
    UILabel * placeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
    [placeLabel sizeToFit];
    placeLabel.font = font;
    placeLabel.numberOfLines = 1;
    placeLabel.textColor = [UIColor lightGrayColor];
    placeLabel.text = string;
    [self addSubview:placeLabel];
    [self setValue:placeLabel forKey:@"_placeholderLabel"];
}

@end
